package com.zte.smbms_plus.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zte.smbms_plus.pojo.SmbmsAddress;
import com.zte.smbms_plus.service.SmbmsAddressService;
import com.zte.smbms_plus.mapper.SmbmsAddressMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author DY
* @description 针对表【smbms_address】的数据库操作Service实现
* @createDate 2021-12-29 09:20:18
*/
@Service
public class SmbmsAddressServiceImpl extends ServiceImpl<SmbmsAddressMapper, SmbmsAddress>
    implements SmbmsAddressService{

    @Autowired SmbmsAddressMapper addressMapper;

    /**
     * 查询所有地址或者根据id查询地址
     *
     * @param aid
     * @return
     */
    @Override
    public List<SmbmsAddress> findAddressOrById(Long aid) {
        return addressMapper.findAddressOrById(aid);
    }

    /**
     * 增加地址
     *
     * @param address
     * @return
     */
    @Override
    public boolean addAddress(SmbmsAddress address) {
        return addressMapper.addAddress(address);
    }

    /**
     * 修改地址
     *
     * @param address
     * @return
     */
    @Override
    public boolean updateAddress(SmbmsAddress address) {
        return addressMapper.updateAddress(address);
    }

    /**
     * 删除地址
     *
     * @param aid
     * @return
     */
    @Override
    public boolean delAddress(Long aid) {
        return addressMapper.delAddress(aid);
    }
}




